import request from '@/utils/request'

// 创建理发师
export function createBarber(data) {
  return request({
    url: '/lfd/barber/create',
    method: 'post',
    data: data
  })
}

// 更新理发师
export function updateBarber(data) {
  return request({
    url: '/lfd/barber/update',
    method: 'put',
    data: data
  })
}

// 删除理发师
export function deleteBarber(id) {
  return request({
    url: '/lfd/barber/delete?id=' + id,
    method: 'delete'
  })
}

// 获得理发师
export function getBarber(id) {
  return request({
    url: '/lfd/barber/get?id=' + id,
    method: 'get'
  })
}

// 获得理发师分页
export function getBarberPage(query) {
  return request({
    url: '/lfd/barber/page',
    method: 'get',
    params: query
  })
}
export function getAllBarber() {
  return request({
    url: '/lfd/barber/listAll',
    method: 'get',
  })
}
// 导出理发师 Excel
export function exportBarberExcel(query) {
  return request({
    url: '/lfd/barber/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
